package com.xiaoyu.lanling.feature.checkin.datamodel

import `in`.srain.cube.request.JsonData
import `in`.srain.cube.views.list.ListItemTypedBase
import com.xiaoyu.lanling.media.image.ImageLoadParam
import java.io.Serializable

class CheckInDailyItem(jsonData: JsonData) : Serializable, ListItemTypedBase {

    val icon = jsonData.optString("icon")
    val selected = jsonData.optBoolean("selected")
    val statusDesc = jsonData.optString("statusDesc")
    val title = jsonData.optString("title")

    val imageLayoutParams
        get() = ImageLoadParam.newBuilder().setUrl(icon).setSizeInDP(40).build()

    override fun getViewType(): Int {
        return 0
    }
}